package com.btpj.shop.dto.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;

@ApiModel("用户相关参数")
@Data
public class UserParam {
    @ApiModelProperty("用户名")
    @Length(min = 1, max = 20, message = "用户名必须包含1～20个字符")
    private String name;

    @ApiModelProperty("昵称")
    @Length(min = 1, max = 20, message = "昵称必须包含1～50个字符")
    private String nickName;

    @ApiModelProperty("用户头像链接")
    private String photo;

    @ApiModelProperty("邮箱")
    @Email
    private String email;

    @ApiModelProperty("手机号")
    private String phone;
}
